package com.tinem.platform.module.starter.jpa.entity.data;

import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.*;
import org.hibernate.annotations.DynamicInsert;
import org.hibernate.annotations.DynamicUpdate;
import javax.persistence.*;
import java.io.Serializable;
import java.util.Date;

/**
 * @author fzh
 * @version v1
 * @program: platform
 * @className Areas
 * @description 行政区域表
 * @site
 * @company
 * @create 2022-1-24
 */
@Data
@Entity
@ToString
@DynamicInsert
@DynamicUpdate
@EqualsAndHashCode
@NoArgsConstructor
@AllArgsConstructor
@Table(name="t_areas")
@ApiModel("行政区域表")
public class Areas implements Serializable,Cloneable{
    @Id
    @Column(name = "c_id",nullable=true)
    @ApiModelProperty(name = "id", value = "ID",required = true)
    private String id;

    @Column(name = "c_s_id",nullable=true)
    @ApiModelProperty(name = "sId", value = "基准ID",required = true)
    private String sId;

    @Column(name = "c_name",nullable=true)
    @ApiModelProperty(name = "name", value = "名称",required = true)
    private String name;

    @Column(name = "c_abbr",nullable=true)
    @ApiModelProperty(name = "abbr", value = "地区简称",required = true)
    private String abbr;

    @Column(name = "c_sort",nullable=true)
    @ApiModelProperty(name = "sort", value = "排序",required = true)
    private Integer sort;

    @Column(name = "c_parent_id",nullable=true)
    @ApiModelProperty(name = "parentId", value = "上级ID",required = true)
    private String parentId;

    @Column(name = "c_lang_id",nullable=true)
    @ApiModelProperty(name = "langId", value = "语言编号",required = true)
    private String langId;

    @Column(name = "c_created_at",nullable=true)
    @ApiModelProperty(name = "createdAt", value = "创建时间",required = true)
    private Date createdAt;

    @Column(name = "c_updated_at",nullable=true)
    @ApiModelProperty(name = "updatedAt", value = "更新时间",required = true)
    private Date updatedAt;

    @Enumerated(EnumType.STRING)
    @Column(name = "c_enabled",nullable=true)
    @ApiModelProperty(name = "enabled", value = "enabled",required = true)
    private com.tinem.platform.module.pojo.enums.common.Enabled enabled;

    @Version
    @Column(name = "c_revision",nullable=true)
    @ApiModelProperty(name = "revision", value = "乐观锁",required = false)
    private Integer revision;

    @Column(name = "c_created_by",nullable=true)
    @ApiModelProperty(name = "createdBy", value = "创建人",required = false)
    private String createdBy;

    @Column(name = "c_created_time",nullable=true,insertable = false,updatable = false)
    @ApiModelProperty(name = "createdTime", value = "创建时间",required = false)
    private Date createdTime;

    @Column(name = "c_updated_by",nullable=true)
    @ApiModelProperty(name = "updatedBy", value = "更新人",required = false)
    private String updatedBy;

    @Column(name = "c_updated_time",nullable=true,insertable = false,updatable = false)
    @ApiModelProperty(name = "updatedTime", value = "更新时间",required = false)
    private Date updatedTime;

}